package com.zsrt.javaweb.ch02;

import org.junit.Test;

public class ArithmeticCalculateSpringAOPTest {
	
	
	
	
	@Test
	public void exceptionTest() throws Exception {
		
		ArithmeticCalculate target = new ArithmeticCalculateImpl();
		
		ArithmeticCalculate proxy = new ArithmeticCalculateLoggingProxySpringAOP(target).getProxy();
		
		proxy.div(6, 0);
	}
	
	@Test
	public void commonTest() throws Exception {
		
		ArithmeticCalculate target = new ArithmeticCalculateImpl();
		
		ArithmeticCalculate proxy = new ArithmeticCalculateLoggingProxySpringAOP(target).getProxy();
		
		proxy.div(6, 2);
	}
	

}
